/**
 * loading 占位
 * 解决首次加载时白屏的问题
 */
(function () {
  const _root = document.querySelector('#root');
  if (_root && _root.innerHTML === '') {
    _root.innerHTML = `
    <style>
    html,
    body,
    #root {
      height: 100%;
      margin: 0;
      padding: 0;
    }
    #root {
      background-repeat: no-repeat;
      background-size: 100% auto;
    }
    .noscript-container {
      display: flex;
      align-content: center;
      justify-content: center;
      margin-top: 90px;
      font-size: 20px;
      font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    }
    .noscript-enableJS {
      padding-right: 3px;
      padding-left: 3px;
    }
    .page-loading-warp {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 98px;
    }
    .ant-spin {
      position: absolute;
      display: none;
      -webkit-box-sizing: border-box;
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      color: rgba(0, 0, 0, 0.65);
      color: #1890ff;
      font-size: 14px;
      font-variant: tabular-nums;
      line-height: 1.5;
      text-align: center;
      list-style: none;
      opacity: 0;
      -webkit-transition: -webkit-transform 0.3s
        cubic-bezier(0.78, 0.14, 0.15, 0.86);
      transition: -webkit-transform 0.3s
        cubic-bezier(0.78, 0.14, 0.15, 0.86);
      transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
      transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
        -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
      -webkit-font-feature-settings: "tnum";
      font-feature-settings: "tnum";
    }

    .ant-spin-spinning {
      position: static;
      display: inline-block;
      opacity: 1;
    }

    .ant-spin-dot {
      position: relative;
      display: inline-block;
      width: 20px;
      height: 20px;
      font-size: 20px;
    }

    .ant-spin-dot-item {
      position: absolute;
      display: block;
      width: 9px;
      height: 9px;
      background-color: #1890ff;
      border-radius: 100%;
      -webkit-transform: scale(0.75);
      -ms-transform: scale(0.75);
      transform: scale(0.75);
      -webkit-transform-origin: 50% 50%;
      -ms-transform-origin: 50% 50%;
      transform-origin: 50% 50%;
      opacity: 0.3;
      -webkit-animation: antspinmove 1s infinite linear alternate;
      animation: antSpinMove 1s infinite linear alternate;
    }

    .ant-spin-dot-item:nth-child(1) {
      top: 0;
      left: 0;
    }

    .ant-spin-dot-item:nth-child(2) {
      top: 0;
      right: 0;
      -webkit-animation-delay: 0.4s;
      animation-delay: 0.4s;
    }

    .ant-spin-dot-item:nth-child(3) {
      right: 0;
      bottom: 0;
      -webkit-animation-delay: 0.8s;
      animation-delay: 0.8s;
    }

    .ant-spin-dot-item:nth-child(4) {
      bottom: 0;
      left: 0;
      -webkit-animation-delay: 1.2s;
      animation-delay: 1.2s;
    }

    .ant-spin-dot-spin {
      -webkit-transform: rotate(45deg);
      -ms-transform: rotate(45deg);
      transform: rotate(45deg);
      -webkit-animation: antrotate 1.2s infinite linear;
      animation: antRotate 1.2s infinite linear;
    }

    .ant-spin-lg .ant-spin-dot {
      width: 32px;
      height: 32px;
      font-size: 32px;
    }

    .ant-spin-lg .ant-spin-dot i {
      width: 14px;
      height: 14px;
    }

    @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
      .ant-spin-blur {
        background: #fff;
        opacity: 0.5;
      }
    }

    @-webkit-keyframes antSpinMove {
      to {
        opacity: 1;
      }
    }

    @keyframes antSpinMove {
      to {
        opacity: 1;
      }
    }

    @-webkit-keyframes antRotate {
      to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
      }
    }

    @keyframes antRotate {
      to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
      }
    }
  </style>
      <div style="
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          height: 100%;
          min-height: 420px;
        ">
<span className={'anticon anticon-smile'}>
      <svg className="icon" viewBox="0 0 1024 1024"
           width="200" height="200">
        <animateTransform
          attributeName="transform"
          begin="0s"
          dur="6s"
          type="rotate"
          from="0"
          to="360"
          repeatCount="indefinite"
        />
        <path
          d="M957.218 311.652v-111.304h-66.784V133.566h-66.782V66.782h-111.304V0H311.652v66.782h-111.304v66.784H133.566v66.782H66.782v111.304l-66.766 0.006v400.696h66.766v111.298h66.784V890.434h66.782V957.218h111.304V1024h400.696v-66.782h111.304V890.434h66.782V823.652h66.784v-111.298h22.274v-0.006H1024V311.652z"
          fill="#FFDE46"
        >
        </path>
        <path
          d="M957.218 311.652v-111.304h-66.784V133.566h-66.782V66.782h-111.304V0H311.652v66.782h-111.304v66.784H133.566v66.782H66.782v111.304H0v66.782h133.566v-111.304h66.782v-66.782h66.782V133.566h489.74v66.782h66.782v66.782h66.782v111.304H1024v-66.782z"
          fill="#FFFFFF"
        >
        </path>
        <path
          d="M200.348 66.782h111.304v66.782h-111.304zM133.566 133.566h66.782v66.782H133.566zM66.782 200.348h66.782v111.304H66.782zM66.782 712.348h66.782v111.304H66.782zM133.566 823.652h66.782v66.782H133.566zM200.348 890.434h111.304v66.782h-111.304zM311.652 0h400.696v66.782H311.652zM311.652 957.218h400.696V1024H311.652zM0 311.652h66.782v400.696H0zM712.348 66.782h111.304v66.782h-111.304zM823.652 133.566h66.782v66.782h-66.782zM890.434 200.348h66.782v111.304h-66.782zM890.434 712.348h66.782v111.304h-66.782zM823.652 823.652h66.782v66.782h-66.782zM712.348 890.434h111.304v66.782h-111.304zM957.218 311.652H1024v400.696h-66.782zM267.13 623.304h66.782v133.566h-66.782zM690.086 623.304h66.782v133.566h-66.782zM333.914 756.87h356.174v66.782H333.914zM244.87 267.13h133.566V534.26h-133.566zM645.566 267.13h133.566V534.26h-133.566z"
        >
        </path>
      </svg>
    </span>
<div class="page-loading-warp">
<div class="ant-spin ant-spin-lg ant-spin-spinning">
<span class="ant-spin-dot ant-spin-dot-spin">
<i class="ant-spin-dot-item"></i>
<i class="ant-spin-dot-item"></i>
<i class="ant-spin-dot-item"></i>
<i class="ant-spin-dot-item"></i>
</span>
</div>
</div>
<div style="display: flex; align-items: center; justify-content: center;font-size: 40px;font-weight: bold">
Welcome File YoungYa's System!!!
</div>
</div>
</div>
    `;
  }
})();
